package com.hjs.paclouddao.service.impl;

import com.hjs.paclouddao.dao.FileMapper;
import com.hjs.paclouddao.pojo.File;
import com.hjs.paclouddao.service.IFileService;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.net.MalformedURLException;
import java.nio.file.Path;
import java.util.List;
import java.util.stream.Stream;

/**
 * @auther hanjinsong
 * @create 2019-08-19 11:58
 */
@Service
public class FileServiceImpl implements IFileService {


    @Autowired
    private FileMapper fileMapper;


    @Override
    public int insert(File file) {
        return 0;
    }

    @Override
    public File select(Integer id) {
        return fileMapper.selectById(id);
    }

    @Override
    public List<String> selectAllName() {
        return fileMapper.selectAllName();
    }

    @Override
    public void init() {

    }

    @Override
    public void store(MultipartFile file) throws IOException {

    }

    @Override
    public Stream<Path> loadAll() throws IOException {
        return null;
    }

    @Override
    public Path load(String filename) {
        return null;
    }

    @Override
    public Resource loadAsResource(String filename) throws MalformedURLException {
        return null;
    }

    @Override
    public void deleteAll() {

    }
}
